<?php
//ini_set('error_reporting', E_ALL);

define("APPLICATION_NAME", "admin");

// Define path to application directory
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/' . APPLICATION_NAME));
//echo APPLICATION_PATH;die;
// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../../library'),
    get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Loader.php';

Zend_Loader::loadClass("St_Registry");
Zend_Loader::loadClass("St_Application");

// Create application, bootstrap, and run
$application = new St_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/config.php'
);
$application->bootstrap()
            ->run();